import java.text.SimpleDateFormat
import java.util.Date

object testDemo extends App {
  def func1(date: Date): String = {
    val date1 = new SimpleDateFormat("yyyyMMdd").format(date)
    println(date1)
    println(date.toString)
    date.toString.replace("-", "")
    println(date)
    date.toString.replace("-", "")

  }
  val dateStr = "00:00:00"
  val pattern = "HH:mm:ss"
  val date = new SimpleDateFormat(pattern).parse(dateStr)
  func1(date)
}
